// 字符串工具
import _ from 'lodash'

const json2Prams = function (obj) {
  let keys = Object.keys(obj)
  let str = ''
  keys.forEach(e => {
    let v = ''
    if (!_.isNil(obj[e])) {
      v = obj[e]
    }
    str += e + '=' + v + '&'
  })
  return str
}

export {json2Prams}
